What is 3 sheets to the wind meaning?

The phrase "three sheets to the wind" refers to a person who is very drunk and can no longer control themselves. It is believed to have originated from sailing terminology, where the "sheets" (ropes that control the sails) were numbered, and when a ship had three of them loose, it would sway uncontrollably like a drunk person. Today, the phrase is commonly used to describe someone who is heavily intoxicated and acting foolishly or irresponsibly.